<template>
	<view class="container">
		<view class="search">
			<uni-search-bar @confirm="search" @input="input" placeholder="请输入" bgColor="#EFEFF4" :radius="100"></uni-search-bar>
		</view>
		<view class="kong"></view>
		<view class="now">
			<view class="zi">当前考试</view>
		</view>
		<scroll-view scroll-y="true" class="con">
			<view v-for="(item,index) in items" :key='item.id' class="now-exam"  >
				<view><image :src='item.scr' class="icon"></image></view>
				<view class="exam">{{item.exam}}</view>
				<view class="name">{{item.name}}</view>
				<!-- <navigator url="enter-exam/enter-exam"></navigator> -->
					<view><button  class="enter" @click="toExam">进入考试</button></view>
			</view>
		</scroll-view>
		
		<view class="former">
			<view class="zi">历史考试</view>
		</view>
		<scroll-view scroll-y="true" class="cn">
			<view v-for="(item,index) in bigitems" :key='item.id' class="now-exam">
				<view><image :src='item.scr' class="icon"></image></view>
				<view class="exam">{{item.exam}}</view>
				<view class="name">{{item.name}}</view>
				
				<view><button class="enter" @click="lookexam()">查看成绩</button></view>	
			</view>
		</scroll-view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				items:[
					{
						exam:'高数期末考试',
						name:'许愿',
						id:'0',
						scr:'../../../static/kaoshi.png'
						
					},
					{
						exam:'英语综合测评',
						name:'张一凡',
						id:'1',
						scr:'../../../static/exam.png'
					},
					{
						exam:'线代综合测评',
						name:'高明远',
						id:'2',
						scr:'../../../static/exam.png'
					},
					{
						exam:'英语综合测评',
						name:'张利',
						id:'3',
						scr:'../../../static/exam.png'
					},
					{
						exam:'线代综合测评',
						name:'高小雨',
						id:'4',
						scr:'../../../static/exam.png'
					},{
						exam:'英语结业测评',
						name:'叶知秋',
						id:'5',
						scr:'../../../static/exam.png'
					},
					{
						exam:'线代综合测评',
						name:'徐峰',
						id:'6',
						scr:'../../../static/exam.png'
					},
					
				],
				bigitems:[
					{
						exam:'线代期中考试',
						name:'封一堃',
						id:'0',
						scr:'../../../static/kaoshi.png'
					},
					{
						exam:'物理阶段测评',
						name:'肖云霞',
						id:'1',
						scr:'../../../static/exam.png'
					},
					{
						exam:'线代期中考试',
						name:'管理员',
						id:'2',
						scr:'../../../static/kaoshi.png'
					},
					{
						exam:'物理综合测评',
						name:'王帆',
						id:'3',
						scr:'../../../static/exam.png'
					},{
						exam:'线代期中考试',
						name:'管理员',
						id:'4',
						scr:'../../../static/kaoshi.png'
					},
					{
						exam:'高数综合测评',
						name:'李米',
						id:'5',
						scr:'../../../static/exam.png'
					},{
						exam:'线代期中考试',
						name:'管理员',
						id:'6',
						scr:'../../../static/kaoshi.png'
					},
					{
						exam:'物理期末考试',
						name:'米咪',
						id:'7',
						scr:'../../../static/exam.png'
					},
					
					
				]
				
				
			}
		},
		methods: {
			toExam(){
				uni.navigateTo({
					url:'/pages/stu-duan/exam/enter-exam/enter-exam'
				})
			},
			lookexam(){
				uni.navigateTo({
					url:'/pages/stu-duan/exam/look-exam/look-exam'
				})
			}						
		}
	}
</script>

<style >
	.cn{
		width: 100%;
		height: 520rpx;
	}
	.con{
		width: 100%;
		height: 520rpx;
	}
	.container{
		height: calc(95vh - 0rpx);
		background-color: #EFEFF4;
	}
	.search{
	
		background-color: #FFFFFF;
	}
	.kong {
		height: 60rpx;
		width: 100%;
		background-color: #FFFFFF;
	}
	.now{
		height: 80rpx;
		width: 100%;
		background-color:#EFEFF4;
		display: flex;
		flex-direction: column;
		justify-content: center;
		
	}
	.zi{
		height: 50%;
		width: 200rpx;
		display: flex;
		flex-direction: row;
		justify-content: center;
	}
	.former{
		height: 80rpx;
		width: 100%;
		background-color:#EFEFF4;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
	.now-exam{
		height: 130rpx;
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-around;
		align-items: center;
		border: 2rpx #bbbbbb solid;
		background-color: #FFFFFF;
	}
	.icon{
		height: 60rpx;
		width: 60rpx;
	}
	button{
		background-color: #12754F;
		color: #FFFFFF;
		font-size: small;
	}
	

	
</style>
